namespace CoreManager.Models.DTOs
{
    /// <summary>
    /// 文件上传请求DTO
    /// </summary>
    public class FileUploadDto
    {
        /// <summary>
        /// 业务类型（用于分类存储）
        /// </summary>
        public string? BusinessType { get; set; }

        /// <summary>
        /// 业务ID（关联的业务主键）
        /// </summary>
        public string? BusinessId { get; set; }
    }

    /// <summary>
    /// 文件上传响应DTO
    /// </summary>
    public class FileUploadResultDto
    {
        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; } = string.Empty;

        /// <summary>
        /// 原始文件名
        /// </summary>
        public string OriginalFileName { get; set; } = string.Empty;

        /// <summary>
        /// 文件大小（字节）
        /// </summary>
        public long FileSize { get; set; }

        /// <summary>
        /// 文件扩展名
        /// </summary>
        public string Extension { get; set; } = string.Empty;

        /// <summary>
        /// 文件相对路径
        /// </summary>
        public string RelativePath { get; set; } = string.Empty;

        /// <summary>
        /// 文件访问URL
        /// </summary>
        public string Url { get; set; } = string.Empty;

        /// <summary>
        /// 文件MD5值
        /// </summary>
        public string Md5 { get; set; } = string.Empty;

        /// <summary>
        /// 上传时间
        /// </summary>
        public DateTime UploadTime { get; set; }
    }

    /// <summary>
    /// 文件删除请求DTO
    /// </summary>
    public class FileDeleteDto
    {
        /// <summary>
        /// 文件相对路径
        /// </summary>
        public string RelativePath { get; set; } = string.Empty;
    }

    /// <summary>
    /// 批量文件删除请求DTO
    /// </summary>
    public class BatchFileDeleteDto
    {
        /// <summary>
        /// 文件相对路径列表
        /// </summary>
        public List<string> RelativePaths { get; set; } = new();
    }

    /// <summary>
    /// 文件信息DTO
    /// </summary>
    public class FileInfoDto
    {
        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; } = string.Empty;

        /// <summary>
        /// 文件大小（字节）
        /// </summary>
        public long FileSize { get; set; }

        /// <summary>
        /// 文件大小（格式化）
        /// </summary>
        public string FileSizeFormatted { get; set; } = string.Empty;

        /// <summary>
        /// 文件扩展名
        /// </summary>
        public string Extension { get; set; } = string.Empty;

        /// <summary>
        /// 是否为图片
        /// </summary>
        public bool IsImage { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime ModifyTime { get; set; }
    }
}


